<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.2.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/favicon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon.png">
  <link rel="mask-icon" href="/images/favicon.png" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha256-Z1K5uhUaJXA7Ll0XrZ/0JhX4lAtZFpT6jkKrEDT0drU=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"it-liupp.gitee.io","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.14.1","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"bookmark":{"enable":true,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"}}</script><script src="/js/config.js"></script>

    <meta property="og:type" content="article">
<meta property="og:title" content="OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler">
<meta property="og:url" content="https://it-liupp.gitee.io/2022/06/29/install-openeuler/index.html">
<meta property="og:site_name" content="Hello Mr Liu">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20231221173345575.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629184911791.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185040633.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185118190.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185148193.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185215452.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185242335.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185701854.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629185759517.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629191739771.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629190015040.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629190052230.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629190829601.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220629191130177.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630161339549.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630161840058.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630162151635.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630162239085.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630162744170.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630162854013.png">
<meta property="og:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20220630162923536.png">
<meta property="article:published_time" content="2022-06-29T10:43:57.000Z">
<meta property="article:modified_time" content="2024-01-23T03:36:31.121Z">
<meta property="article:author" content="Mr Liu">
<meta property="article:tag" content="操作系统">
<meta property="article:tag" content="Linux">
<meta property="article:tag" content="OpenEuler">
<meta property="article:tag" content="PostgreSQL">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://it-liupp.gitee.io/images/install-openeuler/image-20231221173345575.png">


<link rel="canonical" href="https://it-liupp.gitee.io/2022/06/29/install-openeuler/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://it-liupp.gitee.io/2022/06/29/install-openeuler/","path":"2022/06/29/install-openeuler/","title":"OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler | Hello Mr Liu</title>
  






  <script async defer data-website-id="" src=""></script>

  <script defer data-domain="" src=""></script>

  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">Hello Mr Liu</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">临江对月</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="搜索" role="button">
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li>
  </ul>
</nav>




</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#1-%E8%BD%BD%E5%85%A5ISO%E9%95%9C%E5%83%8F"><span class="nav-number">1.</span> <span class="nav-text">1.载入ISO镜像</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#2-%E9%80%89%E6%8B%A9%E8%AF%AD%E8%A8%80"><span class="nav-number">2.</span> <span class="nav-text">2.选择语言</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#3-%E5%AE%89%E8%A3%85%E4%BF%A1%E6%81%AF%E6%91%98%E8%A6%81"><span class="nav-number">3.</span> <span class="nav-text">3.安装信息摘要</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#3-1%E7%B3%BB%E7%BB%9F%E5%88%86%E5%8C%BA"><span class="nav-number">3.1.</span> <span class="nav-text">3.1系统分区</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-2%E9%85%8D%E7%BD%AE%E7%BD%91%E7%BB%9C%E5%92%8C%E4%B8%BB%E6%9C%BA%E5%90%8D"><span class="nav-number">3.2.</span> <span class="nav-text">3.2配置网络和主机名</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-3%E7%94%A8%E6%88%B7%E8%AE%BE%E7%BD%AE-%E6%A0%B9%E5%AF%86%E7%A0%81"><span class="nav-number">3.3.</span> <span class="nav-text">3.3用户设置-根密码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-4%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85"><span class="nav-number">3.4.</span> <span class="nav-text">3.4系统安装</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#4-%E8%A1%A5%E5%85%85"><span class="nav-number">4.</span> <span class="nav-text">4.补充</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#4-1%E8%B0%83%E6%95%B4SELinux%E7%AD%96%E7%95%A5"><span class="nav-number">4.1.</span> <span class="nav-text">4.1调整SELinux策略</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-2%E5%AE%89%E8%A3%85%E8%A7%A3%E5%8E%8B%E7%BB%84%E4%BB%B6"><span class="nav-number">4.2.</span> <span class="nav-text">4.2安装解压组件</span></a></li></ol></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Mr Liu"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">Mr Liu</p>
  <div class="site-description" itemprop="description">和意识先进的人在一起你才能转变意识，和心态积极的人在一起，你才能够积极，靠自己改变很难，一个人拽着自己的头发是很难把自己拎起来的。</div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">24</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">18</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">32</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="cc-license animated" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="https://cdnjs.cloudflare.com/ajax/libs/creativecommons-vocabulary/2020.11.3/assets/license_badges/big/by_nc_sa.svg" alt="Creative Commons"></a>
  </div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://it-liupp.gitee.io/2022/06/29/install-openeuler/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="Mr Liu">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Hello Mr Liu">
      <meta itemprop="description" content="和意识先进的人在一起你才能转变意识，和心态积极的人在一起，你才能够积极，靠自己改变很难，一个人拽着自己的头发是很难把自己拎起来的。">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler | Hello Mr Liu">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2022-06-29 18:43:57" itemprop="dateCreated datePublished" datetime="2022-06-29T18:43:57+08:00">2022-06-29</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">更新于</span>
      <time title="修改时间：2024-01-23 11:36:31" itemprop="dateModified" datetime="2024-01-23T11:36:31+08:00">2024-01-23</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" itemprop="url" rel="index"><span itemprop="name">操作系统</span></a>
        </span>
          ，
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/%E8%BD%AF%E4%BB%B6%E5%AE%89%E8%A3%85/" itemprop="url" rel="index"><span itemprop="name">软件安装</span></a>
        </span>
    </span>

  
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>1.5k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>5 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <p><img src="/../images/install-openeuler/image-20231221173345575.png" alt="image-20231221173345575"></p>
<span id="more"></span>



<h2 id="1-载入ISO镜像"><a href="#1-载入ISO镜像" class="headerlink" title="1.载入ISO镜像"></a>1.载入ISO镜像</h2><p>​	选择安装OpenEuler；</p>
<p><img src="/../images/install-openeuler/image-20220629184911791.png" alt="image-20220629184911791"></p>
<h2 id="2-选择语言"><a href="#2-选择语言" class="headerlink" title="2.选择语言"></a>2.选择语言</h2><p>​	勾选安装过程中需要使用的语言，可根据实际情况自行选择，这里选择中文；</p>
<p><img src="/../images/install-openeuler/image-20220629185040633.png" alt="image-20220629185040633"></p>
<h2 id="3-安装信息摘要"><a href="#3-安装信息摘要" class="headerlink" title="3.安装信息摘要"></a>3.安装信息摘要</h2><p>​	进入安装信息摘要界面，在这里需要处理标有感叹号的选项后才可以“开始安装”，这里需要配置的有如下几项：</p>
<ol>
<li>系统：这里需要配置系统分区；</li>
<li>软件选择：这里需要配置随系统安装的组件，因为是做为数据库服务器使用，这里选择“最小化安装”，系统组件在随后使用过程中按需安装；</li>
<li>网络和主机名：这里需要配置IP和主机名；</li>
<li>用户设置：这里需要解除root用户的锁定和配置root密码；</li>
</ol>
<p><img src="/../images/install-openeuler/image-20220629185118190.png" alt="image-20220629185118190"></p>
<h3 id="3-1系统分区"><a href="#3-1系统分区" class="headerlink" title="3.1系统分区"></a>3.1系统分区</h3><p>​	点击上图中的“安装目的地”，进入如下界面：</p>
<p><img src="/../images/install-openeuler/image-20220629185148193.png" alt="image-20220629185148193"></p>
<p>​	考虑到作为数据库服务器，数据库的数据文件作为重要文件，期望划分为独立分区管理，默认的自动分区，会将大部分空间划分到home分区下。而home目录的作用主要用于存储个人配置文件，如个人环境变量等，如果建立一个名为“xx”的用户，那么在&#x2F;home目录下就有一个对应的“&#x2F;home&#x2F;xx”路径，用来存放该用户数据。</p>
<p>​	本系统计划用来安装数据库，为了隔离应用程序和数据文件，所以需要重新规划一下分区，规划如下（本系统硬盘总计200G）：</p>
<blockquote>
<p>&#x2F;home 50GB；</p>
<p>&#x2F;data   75GB；# 新增分区，用于存储数据库数据文件；</p>
</blockquote>
<p>​	划分方式及结果下面图示：</p>
<p><img src="/../images/install-openeuler/image-20220629185215452.png" alt="image-20220629185215452"></p>
<p><img src="/../images/install-openeuler/image-20220629185242335.png" alt="image-20220629185242335"></p>
<p><img src="/../images/install-openeuler/image-20220629185701854.png" alt="image-20220629185701854"></p>
<p><img src="/../images/install-openeuler/image-20220629185759517.png" alt="image-20220629185759517"></p>
<h3 id="3-2配置网络和主机名"><a href="#3-2配置网络和主机名" class="headerlink" title="3.2配置网络和主机名"></a>3.2配置网络和主机名</h3><ul>
<li>1.输入后主机名后点击应用；</li>
<li>2.点击“配置”打开以太网配置界面；</li>
<li>3.手动配置IPv4地址和DNS；</li>
<li>4.启用网卡；</li>
</ul>
<p><img src="/../images/install-openeuler/image-20220629191739771.png" alt="image-20220629191739771"></p>
<h3 id="3-3用户设置-根密码"><a href="#3-3用户设置-根密码" class="headerlink" title="3.3用户设置-根密码"></a>3.3用户设置-根密码</h3><ul>
<li>1.取消“锁定root账户勾选”；</li>
<li>2.密码设置策略要求必须含大、小写字母和数字，至少8位；</li>
</ul>
<p><img src="/../images/install-openeuler/image-20220629190015040.png" alt="image-20220629190015040"></p>
<h3 id="3-4系统安装"><a href="#3-4系统安装" class="headerlink" title="3.4系统安装"></a>3.4系统安装</h3><p>​	所有配置项按要求调整完毕后，右下角的“开始安装”则变成可点击项，点击开始进行系统安装，安装完毕后点击“重启系统”，系统安装完成。</p>
<p><img src="/../images/install-openeuler/image-20220629190052230.png" alt="image-20220629190052230"></p>
<p><img src="/../images/install-openeuler/image-20220629190829601.png" alt="image-20220629190829601"></p>
<p>重启后进行命令行登录界面：</p>
<ul>
<li>1.按要求先输入用户名root，然后回车输入密码，密码输入时不显示，输入完毕后回车即可；</li>
<li>2.登录成功后输出welcome信息和系统状态信息，最终停留在”[root@hnsi~]#_”表示系统已经就绪，等待命令输入。</li>
</ul>
<p><img src="/../images/install-openeuler/image-20220629191130177.png" alt="image-20220629191130177"></p>
<h2 id="4-补充"><a href="#4-补充" class="headerlink" title="4.补充"></a>4.补充</h2><h3 id="4-1调整SELinux策略"><a href="#4-1调整SELinux策略" class="headerlink" title="4.1调整SELinux策略"></a>4.1调整SELinux策略</h3><p>​	关于SELinux，<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/SELinux/8865268?fr=aladdin">百度百科</a> 的说法是：</p>
<blockquote>
<p>​	SELinux(Security-Enhanced Linux) 是<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E7%BE%8E%E5%9B%BD%E5%9B%BD%E5%AE%B6%E5%AE%89%E5%85%A8%E5%B1%80/300052">美国国家安全局</a>（NSA）对于<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E5%BC%BA%E5%88%B6%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6/3617989">强制访问控制</a>的实现，是 Linux历史上最杰出的新安全子系统。NSA是在Linux社区的帮助下开发了一种访问控制体系，在这种访问控制体系的限制下，进程只能访问那些在他的任务中所需要文件。SELinux 默认安装在 Fedora 和 Red Hat Enterprise Linux 上，也可以作为其他发行版上容易安装的包得到。</p>
<p>​	SELinux是一种基于 域-类型 模型（domain-type）的<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E5%BC%BA%E5%88%B6%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6/3617989">强制访问控制</a>（MAC）<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E5%AE%89%E5%85%A8%E7%B3%BB%E7%BB%9F/3131501">安全系统</a>，它由NSA编写并设计成内核模块包含到内核中，相应的某些安全相关的应用也被打了SELinux的补丁，最后还有一个相应的安全策略。任何程序对其资源享有完全的控制权。假设某个程序打算把含有潜在重要信息的文件扔到&#x2F;tmp目录下，那么在DAC情况下没人能阻止他。SELinux提供了比传统的UNIX权限更好的<a target="_blank" rel="noopener" href="https://baike.baidu.com/item/%E8%AE%BF%E9%97%AE%E6%8E%A7%E5%88%B6/8545517">访问控制</a>。</p>
</blockquote>
<p>​	大多数教程怕麻烦都建议关闭SELinux，而且在某种情况SELinux自动更新后可能会导致系统无法启动，在没有Linux专业运维人员的情况很难去排查问题及处理。所以我们在使用系统之前，为了避免出现因SELinux策略导致的系统无法启动问题，先来了解一下SELinux的默认配置和可选项。</p>
<p>​	SELinux的配置文件在OpenEuler系统中的路径是“&#x2F;etc&#x2F;selinux&#x2F;config”，编辑该文件：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">vi</span> /etc/selinux/config<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>

<p><img src="/../images/install-openeuler/image-20220630161339549.png" alt="image-20220630161339549"></p>
<p>​	配置SELinux策略是图中①所示行，根据上面的注释，我们看到SELinux配置项可以下三个参数选择其中一个：</p>
<blockquote>
<ul>
<li>Enforcing 强制模式，表示所有违反安全策略的行为都将被禁止，该项为默认；</li>
<li>Permissive 宽容模式，表示所有违反安全策略的行为不被禁止，但是会在日志中予以记录；</li>
<li>Disabled 禁用SELinux。</li>
</ul>
</blockquote>
<p>​	此次我们需要修改为宽容模式（permissive），修改后如图所示：</p>
<p><img src="/../images/install-openeuler/image-20220630161840058.png" alt="image-20220630161840058"></p>
<p>​	修改完毕后，保存退出，然后重启系统后生效。</p>
<p>​	验证SELinux状态的方法：</p>
<blockquote>
<p>1.运行命令getenforce，可以查看SELinux的状态，返回enforcing或permissive。</p>
<p><img src="/../images/install-openeuler/image-20220630162151635.png" alt="image-20220630162151635"></p>
<p>2.运行命令setatus，可以获取更多SELinux信息。</p>
<p><img src="/../images/install-openeuler/image-20220630162239085.png" alt="image-20220630162239085"></p>
</blockquote>
<p>​	更多关于SELinux的信息可参考如下资料：</p>
<blockquote>
<p>1.<a target="_blank" rel="noopener" href="https://www.jb51.net/article/179231.htm">SELinux 入门详解</a></p>
<p>2.<a target="_blank" rel="noopener" href="https://www.jb51.net/article/179232.htm">SELINUX工作原理详解</a></p>
<p>3.<a target="_blank" rel="noopener" href="https://blog.csdn.net/lilygg/article/details/83796770">Selinux的配置与管理</a></p>
</blockquote>
<h3 id="4-2安装解压组件"><a href="#4-2安装解压组件" class="headerlink" title="4.2安装解压组件"></a>4.2安装解压组件</h3><p>​	在系统使用过程中，解压软件包的工作可能必不可少，但OpenEuler22.03版本最小化安装后并未自带tar工具包，所以需要我们自行安装该软件包，否则我们在使用过程会出现如下错误：</p>
<p><img src="/../images/install-openeuler/image-20220630162744170.png" alt="image-20220630162744170"></p>
<blockquote>
<p>​	安装命令： dnf install tar</p>
</blockquote>
<p><img src="/../images/install-openeuler/image-20220630162854013.png" alt="image-20220630162854013"></p>
<p><img src="/../images/install-openeuler/image-20220630162923536.png" alt="image-20220630162923536"></p>
<blockquote>
<p>本章节所有操作均是在root用户下操作，所以在执行命令并未增加sudo，如果执行命令时遇到提示权限不足时，请在命令前增加sudo。</p>
</blockquote>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="reward-container">
  <div>☕请作者喝杯咖啡☕</div>
  <button>
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/wechatpay.jpg" alt="Mr Liu 微信">
        <span>微信</span>
      </div>
      <div>
        <img src="/images/alipay.jpg" alt="Mr Liu 支付宝">
        <span>支付宝</span>
      </div>

  </div>
</div>

          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>Mr Liu
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="https://it-liupp.gitee.io/2022/06/29/install-openeuler/" title="OpenEuler-PostgreSQL系列（一）：手把手教你安装OpenEuler">https://it-liupp.gitee.io/2022/06/29/install-openeuler/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/" rel="tag"># 操作系统</a>
              <a href="/tags/Linux/" rel="tag"># Linux</a>
              <a href="/tags/OpenEuler/" rel="tag"># OpenEuler</a>
              <a href="/tags/PostgreSQL/" rel="tag"># PostgreSQL</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2022/05/19/data-governance-doclinks/" rel="prev" title="数据治理文章相关合集">
                  <i class="fa fa-chevron-left"></i> 数据治理文章相关合集
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2022/07/30/openeuler-install-sonatypenexus/" rel="next" title="OpenEuler安装Sonatype Nexus（Maven私服）">
                  OpenEuler安装Sonatype Nexus（Maven私服） <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">


<div class="copyright">
  &copy; 
  <span itemprop="copyrightYear">2024</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Mr Liu</span>
</div>
<div class="wordcount">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">42k</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">2:32</span>
  </span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

    </div>
  </footer>

  
  <div class="back-to-top" role="button" aria-label="返回顶部">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>
  <a role="button" class="book-mark-link book-mark-link-fixed"></a>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/next-boot.js"></script><script src="/js/bookmark.js"></script>

  




  





</body>
</html>
